/*
 
 */
package com.jme3.gde.gui.extra.xam.model.impl;

import com.jme3.gde.gui.extra.xam.model.NiftyAttribute;
import java.util.List;
import org.w3c.dom.Element;
import com.jme3.gde.gui.extra.xam.model.LayerType;
import com.jme3.gde.gui.extra.xam.model.NiftyModel;
import com.jme3.gde.gui.extra.xam.model.NiftyQName;
import com.jme3.gde.gui.extra.xam.model.ScreenType;
import com.jme3.gde.gui.extra.xam.model.spi.NiftyComponentBase;
import com.jme3.gde.gui.extra.xam.model.visitor.NiftyComponentVisitor;	

/**
 * Implementation for domain component screenType.
 * 
 * @author cuongnguyen
 */
// Generated by XAM AutoGen Tool v0.2
public class ScreenTypeImpl extends NiftyComponentBase implements ScreenType {

    public ScreenTypeImpl(NiftyModel model, Element element) {
        super(model, element);
    }
    
    public ScreenTypeImpl(NiftyModel model) {
        this(model, createElementNS(model, NiftyQName.SCREENTYPE));
    }

    // attributes

    public String getId() {
        return getAttribute(NiftyAttribute.ID);
    }

    public void setId(String id) {
        setAttribute(ID_PROPERTY, NiftyAttribute.ID, id);
    }

    public String getController() {
        return getAttribute(NiftyAttribute.CONTROLLER);
    }

    public void setController(String controller) {
        setAttribute(CONTROLLER_PROPERTY, NiftyAttribute.CONTROLLER, controller);
    }

    public String getInputMapping() {
        return getAttribute(NiftyAttribute.INPUTMAPPING);
    }

    public void setInputMapping(String inputMapping) {
        setAttribute(INPUTMAPPING_PROPERTY, NiftyAttribute.INPUTMAPPING, inputMapping);
    }

    public String getDefaultFocusElement() {
        return getAttribute(NiftyAttribute.DEFAULTFOCUSELEMENT);
    }

    public void setDefaultFocusElement(String defaultFocusElement) {
        setAttribute(DEFAULTFOCUSELEMENT_PROPERTY, NiftyAttribute.DEFAULTFOCUSELEMENT, defaultFocusElement);
    }

    // child elements

    public List<LayerType> getLayerTypes() {
        return getChildren(LayerType.class);
    }

    public void addLayerType(LayerType layerType) {
        appendChild(LAYERTYPE_PROPERTY, layerType);
    }

    public void removeLayerType(LayerType layerType) {
        removeChild(LAYERTYPE_PROPERTY, layerType);
    }

    public void accept(NiftyComponentVisitor visitor) {
        visitor.visit(this);
    }

}